/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       sphere.h
 * Author:     twoja stara
 * Created on: 2009-05-29
 *
 **********************************************************************************************************************/

#ifndef SPHERE_H_
#define SPHERE_H_

#include "shape.h"
#include "vector3.h"

namespace mGameEngine
{

/**
 * Sphere in three dimensional space.
 * Sphere has specified center position and radius.
 */
class Sphere : public Shape
{
private:
    /**
     * Sphere radius.
     */
    float _radius;

    /**
     * Sphere center.
     */
    Vector3 _center;

public:
    /**
     * Create new sphere with specified radius and center.
     * @param radius sphere radius.
     * @param center sphere center.
     */
    Sphere(float radius = 1.0f, const Vector3 &center = Vector3());

    /**
     * Destroy sphere.
     */
    ~Sphere();

    /**
     * Get sphere radius.
     * @return sphere radius.
     */
    float getRadius() const
    {
        return _radius;
    }

    /**
     * Set sphere radius.
     * @param radius sphere radius.
     */
    void setRadius(float radius)
    {
        _radius = radius;
    }

    /**
     * Get sphere center.
     * @return sphere center.
     */
    const Vector3 &getCenter() const
    {
        return _center;
    }

    /**
     * Set sphere center.
     * @param center sphere center.
     */
    void setCenter(const Vector3 &center)
    {
        _center = center;
    }

};

}

#endif // SPHERE_H_
